const target = {
  a: 1,
  b: 2,
  c: {
    name: "c"
  }
};

const proxy = new Proxy(target, {
  get(target, property) {
    console.log("访问的属性：", property);
    return Reflect.get(target, property);
  },
  set(target, property, value) {
    console.log("设置的属性：", property, value);
    return Reflect.set(target, property, value);
  }
});

proxy.c.name = "xiaoxu";
console.log(target);
